package pacBioSimple;

import java.util.Stack;

public class PacBioNodeStack<T> {

	
	Stack<T> myStack;

	public PacBioNodeStack() {
		myStack = new Stack<T>();
	}

	public boolean empty()
	{

	return myStack.empty();

	}

	public T peek()
	{

	return myStack.peek();

	}
	
	
	public void setPeek( T element)
	{
		myStack.set(myStack.size()-1, element);
	}

	public void push(T element)
	{

	myStack.push(element);

	}

	public T pop()
	{

	return myStack.pop();

	}
	
	public int getLength()
	{
		return myStack.size();
	}

	public String toString()
	{
		StringBuilder sb = new StringBuilder();
		for(int i=0; i < myStack.size();++i)
		{
			sb.append(myStack.get(i).toString());
			sb.append("\n");
		}
		sb.append("\n");
		return sb.toString();
	}
}
